/** 
* All Rights Reserved , Copyright (C) 2021 , 青岛鼎信通讯股份有限公司
* 
* MmsUserAccessInfoServiceAuto
* 用户访问信息表新
* 
* 修改纪录
* 2021-06-16 版本：1.0 hudeyong 创建。
* @version 版本：1.0
* @author 作者：hudeyong
* 创建日期：2021-06-16
*/

package com.topscomm.mms.service.impl.auto;

import javax.annotation.Resource;
import com.topscomm.basic.IBasicDao;
import com.topscomm.tap.common.DatacodeCache;
import java.util.Map;
import com.topscomm.mms.*;
import com.topscomm.mms.pojo.MmsUserAccessInfoEntity;
import com.topscomm.mms.dao.IMmsUserAccessInfoDao;


public class MmsUserAccessInfoServiceAuto extends MmsService<MmsUserAccessInfoEntity,IMmsUserAccessInfoDao> {
	
	/**
	 * @author: hudeyong
	 * @date: 2021-06-16
	 * @param mapRow
	 * @description:设置字段显示值
	 * @modify:
	 */
	@Override
	public void setDispFields(Map<String, Object> mapRow, DatacodeCache datacodeCache) {
		String temp;
		if (mapRow.get("usercode") != null) {
			temp = mapRow.get("usercode").toString();
			mapRow.put("dispusercode", datacodeCache.getValueDynamic("CboUser", temp, "code", "name"));
		}
		if (mapRow.get("deptcode") != null) {
			temp = mapRow.get("deptcode").toString();
			mapRow.put("dispdeptcode", datacodeCache.getValueDynamic("CboDeptFull", temp, "code", "name"));
		}
		if (mapRow.get("orgcode") != null) {
			temp = mapRow.get("orgcode").toString();
			mapRow.put("disporgcode", datacodeCache.getValueDynamic("CboOrg", temp, "code", "name"));
		}
		if (mapRow.get("loginmode") != null) {
			temp = mapRow.get("loginmode").toString();
			mapRow.put("disploginmode", datacodeCache.getValueDynamic("MmsLoginMode", temp, "code", "name"));
		}
		if (mapRow.get("enabled") != null) {
			temp = mapRow.get("enabled").toString();
			mapRow.put("dispenabled", datacodeCache.getValueDynamic("CboYesNo", temp, "code", "name"));
		}
	}

	@Override
	@Resource(name = "mmsUserAccessInfoDao")
	public void setDao(IBasicDao<MmsUserAccessInfoEntity> dao) {		
		super.setDao(dao);
	}
}
